package main

import "fmt"

func findMagicIndex(nums []int) int {
	for key,val := range nums {
		if key == val{
			return key
		}
	}
return -1
}

func main()  {
	arr := []int{0,1,2,34,5}
	x :=findMagicIndex(arr)
	fmt.Println(x)
}
